<?php
// +----------------------------------------------------------------------
// | saiadmin [ saiadmin快速开发框架 ]
// +----------------------------------------------------------------------
// | Author: your name
// +----------------------------------------------------------------------
namespace app\ai\validate;

use think\Validate;

/**
 * 任务列表验证器
 */
class TaskValidate extends Validate
{
    /**
     * 定义验证规则
     */
    protected $rule =   [
        'uid' => 'require',
        'articulation' => 'require',
        'manual' => 'require',
        'submission_status' => 'require',
        'task_status' => 'require',
        'server_name' => 'require',
        'is_share' => 'require',
        'view' => 'require',
    ];

    /**
     * 定义错误信息
     */
    protected $message  =   [
        'uid' => '用户 ID必须填写',
        'articulation' => '清晰度必须填写',
        'manual' => '是否人工单必须填写',
        'submission_status' => '提交状态必须填写',
        'task_status' => '任务状态必须填写',
        'server_name' => '关联服务器名称必须填写',
        'is_share' => '是否分享必须填写',
        'view' => '点赞次数必须填写',
    ];

    /**
     * 定义场景
     */
    protected $scene = [
        'save' => [
            'uid',
            'articulation',
            'manual',
            'submission_status',
            'task_status',
            'server_name',
            'is_share',
            'view',
        ],
        'update' => [
            'uid',
            'articulation',
            'manual',
            'submission_status',
            'task_status',
            'server_name',
            'is_share',
            'view',
        ],
    ];

}
